package com.qf.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
public class User {//{uname:'',username:''}
    private Integer uid;
    private String uname;
//    @JsonProperty("username")  改变实体对应的json对象的属性名
    private String realname;
//    @JsonIgnore 不生成json字段
    private String pass;
    @DateTimeFormat(pattern = "yyyy-MM-dd") //返回日期的格式
    @JsonFormat(pattern = "yyyy-MM-dd") //json中日期的格式
    private Date birth;
    private String tel;
    private String email;

}
